package game.business

import game.enums.Direction
import game.model.View
import game.model.impl.Enemy

/**
 * 运动能力
 */
interface Movable : Move {

    /**
     * 判断移动的物体是否和阻塞物体发生碰撞
     *
     * @return 如果为null 则没有发生碰撞
     */
    fun willCollision(block: BlockAble):Direction?{



        var collision = checkCollisionWithBoundary(block)

        return if (collision) currentDirection else null
    }

    /**
     * 通知碰撞
     */
    fun notifyCollision(direction: Direction?,block: BlockAble?)
}